home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / topspin2.arc / TOPSPIN.DOC < prev    next >
Encoding:
Text File  |  1987-09-06  |  18.8 KB  |  391 lines

  1.           TOPSPIN V1.26 (with application hints)
  2.     Topspin  is  designed  to allow the user  of  an  IBM  PC 
  3. compatible  computer  to  construct  custom  menus   specifically 
  4. tailored  to  the  user's  requirements.  Most  "powerusers"   of 
  5. personal  computers  do  not like menu driven  systems.  This  is 
  6. generally  true because the menus don't do what the user  of  the 
  7. machine actually wants done. Topspin attempts to correct this  by 
  8. allowing  the   user  to build fast acting menus, set  up  to  do 
  9. precisely what the machine operator wishes the machine to do. The 
  10. ultimate  limitation on the amount of work which a computer  user 
  11. may  accomplish  is the number of keystrokes which  the  user  is 
  12. forced to enter in order to accomplish his or her ultimate goals. 
  13. The  Topspin  package  allows a user to  reduce  this  number  of 
  14. keystrokes to the minimum possible: 1 per task.
  15.      Topspin  is  distributed under the  Shareware  concept.  For 
  16. those not familiar with the idea: Shareware is an attempt to hold 
  17. down  the cost of software by minimizing the costs of  publishing 
  18. and  distribution. Shareware is similar in concept to the  "Honor 
  19. System"  method of candy sales; both are based on the  fact  that 
  20. most people are honest enough to pay for what they get. Shareware 
  21. offers the advantage of allowing a customer to try out and test a 
  22. program  before  buying  it. It is a simple  fact  of  life  that 
  23. computer  users pass software around. Shareware legitimizes  this 
  24. fact:  feel  free  to  pass this  package  to  your  friends  and 
  25. associates. No matter how you came to possess this software - you 
  26. may  become  a registered owner of it by sending ten  dollars  by 
  27. check or money order to:
  28.  
  29.                            Robert Canup
  30.                            PBTV
  31.                            P.O. Box 31075
  32.                            Houston, TX 77231
  33.  
  34.  
  35. Protect  the  concept  and  advantages  of  Shareware:  become  a 
  36. registered owner today.
  37.     
  38.  Commercial site licensing is available upon request. 
  39.  
  40.      "If you are lucky the things you forgot are the things which 
  41. didn't matter." 
  42.                                         M. Robert Showalter
  43.  
  44.      This is,  at best,  an imperfect world:  people die, the sun 
  45. emits  cancer causing rays,  a sufficiently strong magnetic field 
  46. will destroy superconductivity,  and, despite billions of dollars 
  47. spent on safety, the space shuttle Challenger exploded.
  48.      Great  care  and effort has been expended in the coding  and 
  49. testing of these programs to insure their correct  functionality. 
  50. Unfortunately  testing can only show a program to be  faulty,  no 
  51. amount  of testing can show a program to be error  free.  If,  in 
  52. using  these  programs you do uncover a boundary condition  which 
  53. causes  the  code  to malfunction please feel free  to  send  the 
  54. specifics  of the circumstances which caused the failure  to  the 
  55. above address.  Every effort will be expended in order to attempt 
  56. to correct bugs which are uncovered in this fashion. 
  57.         Due to the unfortunate times in which we live I am forced 
  58. to include the following notice:
  59.  
  60.                ***** LIMITATION OF LIABILITY *****
  61.  
  62. UNDER  NO  CIRCUMSTANCES SHALL THE AUTHOR OF  THESE  PROGRAMS  BE 
  63. LIABLE FOR DAMAGES EITHER DIRECT OR CONSEQUENTIAL, RESULTING FROM 
  64. THE USE OF THESE PROGRAMS. 
  65.      By  the  way,  if you are the sort of pea-brained moron  who 
  66. expects  to get rich by suing someone for  malpractice,  and  you 
  67. find  the  above limitation on liability  too  restricting,  your 
  68. remedy against me is simple: don't use these programs.    
  69.  
  70.  
  71.      The philosophy of Topspin is "Lean and Mean". Topspin  lacks 
  72. windows, colors, sound effects, and fancy opening displays. While 
  73. they make  programs appear to be more "Professional"; such things 
  74. serve  only to annoy someone whose goal is to accomplish as  much 
  75. as is possible in a given period of time. In accordance with  the 
  76. "Lean and Mean" way of doing things Topspin does not require that 
  77. you wait for the entire menu to be printed before accepting  your 
  78. choices  of operations: a valid entry during printing aborts  the 
  79. menu  printout, and performs the selected operation. Part of  the 
  80. idea  of Topspin is that humans tend to work on an out of  sight, 
  81. out  of mind basis. For example if one of the choices on  a  menu 
  82. system is to back up current files, one is much more likely to do 
  83. this  on a regular basis than if one is not visually reminded  of 
  84. it.  The  other  way  in which Topspin tends  to  speed  up  work 
  85. involves  "mode  shifting". If one is involved in a  task  it  is 
  86. annoying,  and confusing to have to shift modes from  a  creative 
  87. problem  solving  one,  to a "what do I have to do  to  get  this 
  88. machine  to   accomplish something". Not only does this  tend  to 
  89. cause  one  to  break  chains of  thought,  it  causes  momentary 
  90. confusion:  "What did I name that file?". When the time is  added 
  91. for typing (and in the case of errors; retyping) complex  command 
  92. lines,  someone using Topspin is well ahead of someone not  using 
  93. it. In developing Topspin when the stage was finally reached that 
  94. the  program could be used to help in its own development,  there 
  95. was a burst increase in the development cycle. 
  96.      In  essence  Topspin is a programmable  menu  generator.  To 
  97. produce  an  output BASIC requires source code which gives  it  a 
  98. list  of  instructions  to perform. Topspin is  similar  in  that 
  99. respect.  Let us assume that you wished to display a  menu  which 
  100. looked like this:
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113. *******************************************************************************
  114.  
  115.                                 Current File: FOO
  116.  
  117.         F1 Edit current file                    F2 Make FOO.exe file
  118.         F3 Edit this menu                       F4 Debug FOO.exe file
  119.         F5 Do anything                          F6 Refetch disk parms
  120.         F7 Do above again                       F8 Copy FOO.exe to floppy
  121.         F9 Backup source                        F10 Change current file
  122.  
  123.                                 Press ESC to exit
  124.  
  125. ******************************************************************************
  126.                Selection>>
  127.  
  128.  
  129.  
  130.  
  131.  
  132.      It  would  be  necessary to supply Topspin  with  an  ASCII 
  133. source file which might look something like this:
  134.  
  135.  
  136.  
  137.  
  138. *******************************************************************************
  139.  
  140.                                 Current File: %1
  141.  
  142.         F1 Edit current file                    F2 Make %1.exe file
  143.         F3 Edit this menu                       F4 Debug %1.exe file
  144.         F5 Do anything                          F6 Refetch disk parms
  145.         F7 Do above again                       F8 Copy %1.exe to floppy
  146.         F9 Backup source                        F10 Change current file
  147.  
  148.                                 Press ESC to exit
  149.  
  150. ******************************************************************************
  151. #* This is an example of a comment line
  152. #* The next non comment line will load WordStar (if it is in  the 
  153. #* system).
  154. #* The lines starting with lbs sign colon define  a  'runstream' 
  155. #* that  is series of characters that will be  supplied  to  the 
  156. #* computer  just  as though the operator had  typed  them.  The 
  157. #* percentage number will be expanded just as they are in a batch 
  158. #* file.
  159. #* The line with the tilde suspends the runstream until we  exit 
  160. #* WordStar,   at  which time we then  perform  the  line  which 
  161. #* follows it . It is not legal to place comment lines between
  162. #* the areas defined by the lbs sign colon.  See next 
  163. #* comment line for next legal position.
  164. ##ws
  165. #:n%1.asm
  166. #:~
  167.  
  168. #:!dir/w
  169. #* This is the next legal comment area
  170. #* Putting an exclamation mark at the start of a line will  cause 
  171. #* the  menu to print the message "Press any  key  to  continue" 
  172. #* before we return to the displayable menu
  173. ##!a %1
  174. #* This is also a legal comment area
  175. ##.ws
  176. #:ndemo.mnu
  177. ##debug %1.exe demo.mnu
  178. ##?!"What do you want to do? "%2 
  179. ##>
  180. ##!%2
  181. ##;copy %1.exe b:
  182. ##copy %1.asm b:
  183. ##<"What is the new program to work on? "%1
  184. #end
  185.  
  186.   
  187.  
  188.      The  first  section of the source file  is  the  displayable 
  189. portion  of the menu. The second section comprises  the  commands 
  190. for  Topspin  to  execute. Three things may  be  noted:  1).  The 
  191. display  shows the line "Selection >>" which does not  appear  in 
  192. the  source file. 2). Any line beginning with '#' in  the  source 
  193. file  is not shown in the displayed menu. 3). The sequence %1  in 
  194. the  source  file has been replaced with "FOO" in  the  displayed 
  195. menu.
  196.      These observations are key to the operation of Topspin.  The 
  197. line  "Selection >>" is the Topspin prompt line, which  indicates 
  198. that  Topspin is ready to accept a user input. The lines  in  the 
  199. source file which begin with '#'are the command lines for Topspin 
  200. to  interpret; they instruct Topspin as to what actions  to  take 
  201. upon  their  activation.  In a short time  we  will  discuss  the 
  202. specifics  of  these command lines. Finally %1 is  a  command  to 
  203. Topspin  which tells it to replace its every occurrence with  the 
  204. first parameter stored in the disk file \menu\current.dta.
  205.      A logical question to ask at this time would be "How did any 
  206. information get into the file 'current.dta' in the first  place?" 
  207. The answer to that question involves the next to the last line in 
  208. the  command section of the demonstration menu above.  This  line 
  209. causes  Topspin to print the quoted prompt line and  accept  user 
  210. input. When it is invoked, it stores the  information in the file 
  211. \menu\current.dta. The symbol to invoke the PUT command is ##< .
  212.      As  you  might  expect,  the  inverse  to  the  PUT  command 
  213. described  above  is a GET command. Normally the  parameters  are 
  214. loaded  from  disk  only when the original menu  is  loaded,  GET 
  215. forces  a reload from disk when it is invoked. The symbol  for  a 
  216. GET command is ##> .
  217.      In a similar fashion the the ##? combination ( which is  the 
  218. PROMPT command) allows a user to supply command line  information 
  219. to  Topspin. This is done by causing Topspin to search  the  line 
  220. for an opening '"' when it finds it PROMPT  clears the screen and 
  221. starts  printing  the information until it finds a  closing  '"'. 
  222. PROMPT  then  accepts keyboard input until a carriage  return  is 
  223. entered.  PROMPT then appends the information to all of  the  non 
  224. quotation enclosed information on its line. PROMPT then  executes 
  225. the  information which now exists on its command line.  In  other 
  226. words: the information which follows PROMPT after it has appended 
  227. the entered keystrokes behaves just as though it had been entered 
  228. at the DOS command prompt.  
  229.      Topspin, upon receiving a user keystroke begins scanning the 
  230. source  file. If the keystroke was F1 it will look for the  first 
  231. occurrence  of a line beginning with '##'. When it finds  one  it 
  232. will  take  what  ever follows the '##'(and  an  optional  single 
  233. character  modifier  to  the '##') and treat  it  as  though  the 
  234. remainder of the line had been entered at the dos command prompt. 
  235. F2  would cause Topspin to execute the second line starting  with 
  236. '##'  etc. If a character is entered for which  no  corresponding 
  237. '##' line exists (example: F3 when only two cases of '##' are  in 
  238. the  source  file)  then the computer will beep at  the  user  to 
  239. indicate an error, and Topspin will continue waiting for a  valid 
  240. keystroke.  Entry  of an invalid character (examples  :  carriage 
  241. return,  backspace,or  &) will cause the same response  from  the 
  242. machine.  It  is equally important to note that after  a  Topspin 
  243. command line has executed it self the computer will return to the 
  244. previously  displayed  menu,  ready  for  another  keystroke  and 
  245. response action.
  246.      The  allowable  keys for menu entry are F1  through  F10,  1 
  247. through  9, and A - Z. Thus a menu may have up to 45  options  on 
  248. one  screen.  Lower  case a - z are converted to A  -  Z  by  the 
  249. program. 
  250.      Please note that the source files are free form, that is; it 
  251. is  permissible for the lines starting with '##' to  come  either 
  252. before or after the lines to be displayed, if the person  writing 
  253. the menu wants them there. Topspin doesn't care about that. As is 
  254. shown  in  the example menu, it is not legal for a  '#*'  comment 
  255. line  to  be  inside a control block, where a  control  block  is 
  256. defined as the region from one '##' to the end of the run  stream 
  257. for that '##'. ( See example menu above for clarification ).
  258.      A  little  earlier we mentioned that the '##' on  a  Topspin 
  259. command  line could be followed by an optional  single  character 
  260. modifier. These modifier characters are :
  261.  
  262. 1). !
  263. 2). ;
  264. 3). .
  265.      Using  the  '!' modifier changes the way that  Topspin  acts 
  266. after the command line with the '##!' on it has executed; instead 
  267. of  immediately  redisplaying  the previous  menu  option  screen 
  268. Topspin  will print "Press any key to continue" and wait for  the 
  269. user  to  press a key. This is useful if the  command  line  were 
  270. something  like  DIR  *.ASM;  since  otherwise  the  menu   would 
  271. overwrite  the displayed file names before the user had a  chance 
  272. to read them.
  273.      The  ';'  modifier disables a menu option .  In  the  sample 
  274. source  code pressing an F8 would cause the computer to  beep  at 
  275. the  user even though sufficient '##' exist on the source  screen 
  276. to allow an F8 to be a valid keyboard option.
  277.      The  '.'  modifier causes Topspin to reload  its  menu  from 
  278. disk;  normally after executing an option Topspin keeps the  menu 
  279. resident in memory. If the '.' option is invoked the menu may  be 
  280. modified  and reloaded in modified form. If the '.'  modifier  is 
  281. not  invoked, the new menu would not be reloaded until  menu  had 
  282. been exited, and re-entered, from the command line.
  283.      It  is  quite  acceptable for the commands  entered  on  the 
  284. Topspin command lines to be the names of batch files. Both PROMPT 
  285. and GET will supply the %1 etc. parameters to batch files.
  286.      One  of the most interesting capabilities of Topspin is  the 
  287. fact that the '~' character will suspend operation of an internal 
  288. runstream  until the program activated by the  previously  active 
  289. runstream is exited. If we examine the Demo menu a sample of such 
  290. a  suspension  can  be found. This allows us  to  stop  supplying 
  291. characters  to  a  program  at an  appropriate  point,  and  then 
  292. continue supplying them when we leave the program.
  293.      Topspin symbols:
  294. #* a comment line indicator line is ignored
  295. #: internal character stream
  296. #< put command
  297. #> get command
  298. #end or #END  - end of a menu indicator
  299.      ^M  sends out control M to program (cr).  ^G would send bell 
  300. character etc., when invoked by a #: line.
  301.      |1  sends  out function key 1 (F1) to program |9  sends  out 
  302. function key 9 (F9) etc., when invoked by a #: line.
  303. example:
  304.  
  305. ##ws
  306. #:n%1.asm
  307. #:|1|13
  308.  
  309. The  above would invoke Wordstar , cause a nondocument file,  the 
  310. name of which was supplied by the %1 parameter, to be edited, and 
  311. the  third  line  of the example would send out  F1,F1,3,  and  a 
  312. carriage return, which would cause Wordstar to set its help level 
  313. to level three.
  314.  
  315.      When Topspin is invoked it checks both the current directory 
  316. and  the \MENU directory for the menu named in the command  line. 
  317. This  means that one need not keep copies of menus in all of  the 
  318. different  directories one works in; a single copy in  the  \MENU 
  319. directory is sufficient.
  320.      Topspin  requires  that  the  file  command.com  be  on  the 
  321. currently logged disk.
  322.      To  run Topspin type TOPSPIN <menumame.ext> at  the  command 
  323. line. Where <menuname.ext> is the name and extent of the menu you 
  324. wish to use. Example:
  325.                     TOPSPIN DEMO.MNU
  326.      Topspin  is a multi-user program designed for use on  a  LAN 
  327. machine,  as  well as on a single user machine. Because  of  this 
  328. Topspin  uses Softcraft's well known file access method  Btrieve. 
  329. In order for Topspin to run it is necessary to install Btrieve in 
  330. the computer's memory. Simply adding the line:
  331.  
  332. Btrieve
  333.  
  334.  
  335. to the autoexec.bat file in the root directory is the easiest way 
  336. to  insure  that this condition is met. Each different  user  and 
  337. each  different  menu  in  a  Topspin  system  will  have  custom 
  338. parameters stored for it in the file \menu\current.dta. A copy of 
  339. Btrieve/N , the Novell network version of Btrieve is  distributed 
  340. with Topspin.
  341.                                         Bob Canup 9/2/87
  342.                     Hints for using Topspin.
  343.      I  find it best to put the most commonly used  functions  on 
  344. the menu up at the top, reserving the bottom of the menu for less 
  345. commonly  used options. The reason that I put both function  keys 
  346. and  numbers  ahead of letters as menu options is the  fact  that 
  347. people  use  to  command  lines  will  sometimes  start   typing, 
  348. forgetting that they don't have to. If you are using large  menus 
  349. with letters as options, spurious options may be selected by this 
  350. typing. 
  351.                THE FOLLOWING IS NECESSARY WHEN USING VERSIONS  OF 
  352. DOS BEFORE 3.3. DOS 3.3 MAKES IT POSSIBLE TO SIMPLY TYPE THE NAME 
  353. OF A BATCH FILE ON A ## LINE, EVEN THOUGH THE BATCH FILE  CHANGES 
  354. DIRECTORIES. Earlier versions of DOS get confused if a batch file 
  355. is  in  one  directory, and the batch file attempts to  go  to  a 
  356. separate directory.
  357.  
  358.      To  use  Topspin with external batch files which  reside  in 
  359. different directories it is necessary to do the following:
  360.  
  361. ##
  362. #:cd \DirectoryName
  363. #:BatchFileName
  364.  
  365.      The last line in batch file would be:
  366.  
  367. EXIT
  368.  
  369.      This is necessary because Topspin works by invoking a  child 
  370. copy  of COMMAND.COM . The first line in the menu  selection  (## 
  371. only)  simply loads in the child copy of COMMAND.COM .  To  leave 
  372. this child it is necessary to perform the EXIT command. 
  373.      THE ABOVE PROCEDURE WILL LEAVE THE CURRENT DIRECTORY AS  THE 
  374. ONE  THE  BATCH FILE RESIDED IN WHEN CONTROL IS  PASSED  BACK  TO 
  375. TOPSPIN. Doing operations on files in different directories  with 
  376. batch  files in DOS before v3.3 is an inherently clumsy thing  to 
  377. do.
  378.      Earlier  versions of this documentation (with out the  hints 
  379. section)  grandly  mentioned  the possibility  of  using  Topspin 
  380. internal  runstreams to supply characters internally to  programs 
  381. in a batch file. The reason that this statement was made is  that 
  382. it  is  possible  to supply characters internally  to  the  first 
  383. command  invoked by a batch file. Unfortunately after  the  first 
  384. command  line  batch files gobble up key strokes while  they  are 
  385. running,  and  ignore any supplied by the runstreams.  Grr  sorry 
  386. about that. It is on occasion a frustrating process to argue with 
  387. a PC to try to get it to do what you actually want done,  instead 
  388. of what it wants to do.
  389.  
  390.  
  391.